﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace iHub
{
    public partial class birmonth : Form
    {
        private int m2;
        private String m;
        public birmonth()
        {
            InitializeComponent();
            this.FormClosing += new FormClosingEventHandler(Date_Closing);
        }

        private void Date_Closing(object sender, FormClosingEventArgs e)
        {
            if (e.CloseReason == CloseReason.UserClosing)
            {
                main.form.Enabled = true;
            }
        }

        private void selectdate_Click(object sender, EventArgs e)
        {
            m = month.SelectedItem.ToString();

            if (m == "January")
            {
                m2 = 1;
            }
            else if (m == "February")
            {
                m2 = 2;
            }
            else if (m == "March")
            {
                m2 = 3;
            }
            else if (m == "April")
            {
                m2 = 4;
            }
            else if (m == "May")
            {
                m2 = 5;
            }
            else if (m == "June")
            {
                m2 = 6;
            }
            else if (m == "July")
            {
                m2 = 7;
            }
            else if (m == "August")
            {
                m2 = 8;
            }
            else if (m == "September")
            {
                m2 = 9;
            }
            else if (m == "October")
            {
                m2 = 10;
            }
            else if (m == "November")
            {
                m2 = 11;
            }
            else if (m == "December")
            {
                m2 = 12;
            }

            main.form.Enabled = true;
            main.form.getBIR(m2);
            this.Dispose();
        }
    }
}
